package com.dodo.blog.ui.component.input;

import com.dodo.blog.ui.component.container.Container;

/**
 * @author <a href="mailto:pohorelec@comvai.com">Jozef Pohorelec</a>
 */
public class TextArea
        extends Container
{
    private static final long serialVersionUID = 1L;

    public TextArea( String id )
    {
        super( Tag.TEXTAREA );
        setId( id );
        setName( id );
    }

    public TextArea setAutoFocus( boolean autoFocus )
    {
        if ( autoFocus )
        {
            setAttribute( Attribute.AUTOFOCUS );
        }
        else
        {
            removeAttribute( Attribute.AUTOFOCUS );
        }

        return this;
    }
}
